package mypackage.utils;

import mypackage.bean.Admin;
import mypackage.servicce.AdminService;
import mypackage.servicce.Impl.AdminServiceImpl;

import java.util.Scanner;

/**
 * @author YH925
 * @create 2021/12/12 21:00
 */
public class AdminView {

    private final AdminService adminService = new AdminServiceImpl();

    Views views = new Views();



    public void adminLogin(){
        System.out.println("********************管理员登录********************");
        System.out.print("请输入用户名：");
        Scanner scanner = new Scanner(System.in);
        String username = scanner.next();
        System.out.print("请输入密码：");
        String password = scanner.next();

        Admin admin = adminService.adminLogin(username, password);
        if (admin != null){

            //登录成功
        }else {
            //登录失败
            views.mainView();
        }
    }


}
